package com.fac.vo;

import com.fac.constant.EquipmentStatus;
import com.fac.json.JacksonObjectMapper;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 设备VO
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(description = "设备信息返回对象")
public class EquipmentVO implements Serializable {

    /**
     * 设备ID
     */
    @ApiModelProperty(value = "设备ID", example = "1")
    private Long equipmentId;

    /**
     * 设备编码
     */
    @ApiModelProperty(value = "设备编码", example = "EQ2024001")
    private String code;

    /**
     * 设备名称
     */
    @ApiModelProperty(value = "设备名称", example = "数控车床")
    private String name;

    /**
     * 规格
     */
    @ApiModelProperty(value = "规格", example = "1500x800x1200mm")
    private String specifications;

    /**
     * 分类名称
     */
    @ApiModelProperty(value = "分类名称", example = "加工设备")
    private String categoryName;

    /**
     * 品牌
     */
    @ApiModelProperty(value = "品牌", example = "DMG森精机")
    private String brand;

    /**
     * 型号
     */
    @ApiModelProperty(value = "型号", example = "NLX 2500")
    private String model;

    /**
     * 设备状态
     */
    @ApiModelProperty(value = "设备状态", example = "IDLE", allowableValues = "IDLE,IN_USE,UNDER_REPAIR,SCRAPPED")
    private EquipmentStatus status;

    /**
     * 价值
     */
    @ApiModelProperty(value = "价值", example = "150000.00")
    private BigDecimal value;

    /**
     * 位置
     */
    @ApiModelProperty(value = "位置", example = "A区-01-001")
    private String location;

    /**
     * 购买日期
     */
    @ApiModelProperty(value = "购买日期", example = "2024-01-01 12:00:00")
    @JsonFormat(pattern = JacksonObjectMapper.DEFAULT_DATE_FORMAT)
    private LocalDateTime purchaseDate;

    /**
     * 保修期
     */
    @ApiModelProperty(value = "保修期", example = "2025-01-01 12:00:00")
    private LocalDateTime warrantyPeriod;
} 